Subject: stderr & $VER
From: James Cooper <[email-masked]>
To: [email-masked]
Date: Tue, 13 Jul 1993 09:49:08 -0500 (EDT)

>        Welp.. here I am.  Finally found a forum for the discussion of AmigaE,
>a language I'm pretty impressed with, overall.

Welcome!  :-)

>        Can anyone suggest a way I could open a stderr port to the same
>"window" stdout is hooked to, without having to go through too much convoluted
>programming nonsense?

Since the Amiga doesn't directly support a 'stderr' stream, every C
compiler I know of simply uses an

        Open("*", OLDFILE)

type of statement to "fake" stderr.  '*' is the AmigaDOS shorthand which
means "current console".

>        Also, I've got something of a complaint that perhaps you guys have
>already found a work around for that is better than mine... I would like to
>have a string that is CONST (that is, say:
>
>CONST VERSION = '$VER: Myprog 234098.002 (12.7.93/23:17:34/E 2.1b) An ' +
>                'Example Program'
>
>which could be used anywhere in my program).

Hmm... so far, I haven't been able to do this, except by simply creating
a PTR TO CHAR variable that I never use...

Also, I really *hope* you aren't using a version string like your
example... the correct $VER format, according to Commodore is:

        "$VER: progname v.r (d.m.y)"

where

        '$VER: '        =       is *required*.  All 6 characters, from
                                the leading '$' to a trailing space.

        progname        =       program name with no embedded spaces or
                                periods.

        v               =       major version number of program, in
                                numeric form, with NO leading zeros.

        r               =       minor version number, release number, or
                                whatever, following the numbering scheme
                                of 1,...9,10,...99,100..., with NO
                                leading zeros.

        d               =       day, with NO leading zeros.

        m               =       month, with NO leading zeros.

        y               =       year, last TWO digits only!

and you *must* use periods to separate the d.m.y numbers, or the Locale
stuff from Amiga OS 2.1 and up cannot properly format the date string.

The d.m.y field must be enclosed in parentheses, with no other extra
characters allowed in the string (i.e., nothing else inside the parens,
no trailing comments, etc.).